<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>简介</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="book.zlib.html">Zlib</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="zlib.setup.html">安装／配置</a></div>
 <div class="up"><a href="book.zlib.html">Zlib</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="intro.zlib" class="preface">
  <h1 class="title">简介</h1>
  <p class="para">
   This module enables you to transparently read and write
   gzip (.gz) compressed files, through versions of most of
   the <a href="book.filesystem.html" class="link">filesystem</a> functions
   which work with gzip-compressed files (and uncompressed files,
   too, but not with sockets).
  </p>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
   <p class="para">
    Version 4.0.4 introduced a fopen-wrapper for <var class="filename">.gz</var>-files, so that
    you can use a special <var class="filename">zlib:</var> URL to access
    compressed files transparently using the normal f*() file access
    functions if you prefix the filename or path with
    <var class="filename">zlib:</var> when calling <span class="function"><a href="function.fopen.html" class="function">fopen()</a></span>. This
    feature requires a C runtime library that provides the
    <em>fopencookie()</em> function. Up to now the GNU libc
    seems to be the only library that provides this feature.
   </p>
   <p class="para">
    In PHP 4.3.0, <var class="filename">zlib:</var> has been changed to
    <var class="filename">compress.zlib://</var> to prevent ambiguities with
    filenames containing &#039;<em>:</em>&#039; characters. The
    <em>fopencookie()</em> function is no longer required.
    More information is available in the section about
    <a href="wrappers.compression.html" class="xref">zlib://</a>.
   </p>
  </p></blockquote>
 </div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="book.zlib.html">Zlib</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="zlib.setup.html">安装／配置</a></div>
 <div class="up"><a href="book.zlib.html">Zlib</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
